package com.example.zookeeperdemo;

import org.apache.curator.framework.CuratorFramework;

public class ZookeeperDemo {
    public static void main(String[] args) throws Exception {
        CuratorFramework client = ZookeeperUtils.getClient("10.201.60.123", 2181);
        ZookeeperUtils.creatNode(client, "/gjg_test/newtest", "newtestdata");
        ZookeeperUtils.creatNode(client, "/gjg_test/newtest1", "newtestdata");
        ZookeeperUtils.deleteNode(client, "/gjg_test/newtest1");
        ZookeeperUtils.setNodeData(client, "/gjg_test/newtest", "newtestdataupdate");
        System.out.println(ZookeeperUtils.existNode(client, "/gjg_test/newtest"));
    }
}
